﻿
namespace SessionHunter.Messages
{
    /// <summary>
    /// Used to send messages to the MainViewModel
    /// </summary>
    public class MainViewModelMessage : MessageClassBase<MainViewModelMessage.MessageAction>
    {

        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModelMessage"/> class.
        /// </summary>
        /// <param name="message">The message we want to send to the view.</param>
        public MainViewModelMessage(MainViewModelMessage.MessageAction message)
            : base(message) { }

        /// <summary>
        /// Different actions the view can react to
        /// </summary>
        public enum MessageAction
        {
            /// <summary>
            /// Open the references window
            /// </summary>
            OpenReferencesView,
            /// <summary>
            /// Close the references window
            /// </summary>
            CloseReferencesView,
            /// <summary>
            /// Save the current references to the setting file
            /// </summary>
            SaveReferencesToSettings,
            /// <summary>
            /// Opens the dialog to change the connection string
            /// </summary>
            OpenChangeDatabaseConnectionDialog,
            /// <summary>
            /// Refresh the data, because the connection string has changed
            /// </summary>
            ConnectionStringChanged
        }
    }
}
